
void delay(volatile int d)
{
    while (d--);
}

int led_on(int which)
{
    unsigned int *pGPFCON = (unsigned int *)0x56000050;
    unsigned int *pGPFDAT = (unsigned int *)0x56000054;

    if (4 == which)
    {
        // 配置GPF4控制寄存器为输出引脚
        *pGPFCON = 0x100;
    }
    else if (5 == which)
    {
        // 配置GPF5控制寄存器为输出引脚
        *pGPFCON = 0x400;
    }

    // 配置GPF4数据寄存器为输出0
    *pGPFDAT = 0;
    return 0;
}
